package main

/**
Go语言中的空接口
*/
import "fmt"

func myfunc(iface interface{}) {
	fmt.Println(iface)
}

func main() {
	// 声明一个空接口实例
	var i interface{}
	fmt.Printf("type: %T, value: %v", i, i)
	fmt.Println("===============================================")

	i = 1
	fmt.Println(i)

	i = "hello"
	fmt.Println(i)

	i = false
	fmt.Println(i)

	a := 10
	b := "hello"
	c := true

	myfunc(a)
	myfunc(b)
	myfunc(c)

}
